﻿@model IEnumerable<JuniorProject.Models.Employee.SimpleJobModel>

@{
    ViewBag.Title = "JobList";

}

@section scripts
{
    <link href="@Url.Content("~/Content/themes/base/jquery-tablesorter.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.tablesorter.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('table').tablesorter({ headers: { 2: { sorter: false} }, sortList: [[0, 0]] });
        });
    </script>
}

<h2>Questions to Jobs</h2>
<h4>Please Select a Job to View or Edit its Questions</h4>
<br />

<table id="table" class="tablesorter">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.JobID)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th>
            </th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.JobID)
            </td>
            <td>
                @Html.ActionLink(item.Title, "ViewQuestionsToJob", new { jobID = item.JobID })
            </td>
            <td>
                @Html.ActionLink("Edit", "MapQuestionsToJob", new { jobID = item.JobID, newJob = false })
            </td>
        </tr>
}
    </tbody>
</table>

<br />
@Html.ActionLink("Back to Menu", "Questions") <br />
<p>
    @Html.Partial("_EmployeeBottomNavBar", ViewData["AccessLevel"])
</p>